home *** CD-ROM | disk | FTP | other *** search
/ Inside Macintosh / Inside Macintosh CD-ROM_1995 (CD).toast / Books / Text / Text.rsrc / TOC#_1000 < prev   
Encoding:
Text File  |  1994-08-11  |  40.0 KB  |  17 lines

  1. ÄTextContentsFigures, Tables, and ListingsAbout This Book What to ReadFormat of a Typical ChapterConventions Used in This BookSpecial FontsTypes of NotesDevelopment EnvironmentDeveloper Products and Support&Introduction to Text on the MacintoshMacintosh Text OverviewSeparation of TasksOFigure 1-1    Separation of input, storage, and display in Macintosh text handlingText Is Graphics#Figure 1-2    How QuickDraw draws text/Characters, Glyphs, Character Codes, and Bytes9Figure 1-3    Bytes, character codes, characters, and glyphs:Figure 1-4    Four bytes displayed in Japanese and in English Text Storage*Figure 1-5    Storage order and display orderFigure 1-6    Style runs in textKeyboards and Input Methods'Figure 1-7    Key translation (simplified)OFigure 1-8    Key Caps display of Thai keyboard layout (no modifier keys pressed)OFigure 1-9    Key Caps display of Cyrillic keyboard layout (Caps Lock key pressed)"Writing Systems and Script SystemsMacintosh Text Utilities#TextEdit, a Text-Processing ServiceOFigure 1-10    TextEdit edits and displays mixed-directional text in a dialog box)Planning Your Text Handling CapabilitiesRudimentary Text HandlingModerate Text HandlingSophisticated Text Handling"Writing Systems and Script Systems'Features of the World’s Writing Systems#Figure 1-11    Writing-system examplesCharacter RepresentationGFigure 1-12    Words with alphabetic, syllabic, and ideographic characters"Figure 1-13    Thai character clusterLine Direction and Alignment#Figure 1-14    Line directions in textFigure 1-15    Text alignmentZFigure 1-16    Justification through interword (Hebrew) and intercharacter (Japanese) spacing>Figure 1-17    Justification with Arabic extension bar characters)Contextual Forms and Character Reordering/Figure 1-18    Contextual forms in cursive English5Figure 1-19    Standalone and contextual forms in Arabic$Figure 1-20    A ligature in Roman text%Figure 1-21    A ligature in Arabic text-Figure 1-22    A complex ligature in Arabic textBFigure 1-23    Character reordering in the Devanagari writing systemDiacritical MarksVFigure 1-24    Arabic text with diacritical mark to specify extra emphasis on a consonant&Figure 1-25    Vowel marks in Hebrew text#Uppercase and Lowercase CharactersWord Demarcation8Figure 1-26    Word demarcation in the Roman writing system<Figure 1-27    Line breaking in a bidirectional writing system(Figure 1-28    Word demarcation in JapaneseStyles<Figure 1-29    Selected valid styles in various writing systemsNumbers, Currencies, and Dates*Figure 1-30    Standard international formats Character Order and Text Sorting&Variations Among Languages and Regions4Components of the Macintosh Script Management SystemGFigure 1-31    Components of the script management system for text displayThe Macintosh Text ManagersThe WorldScript ExtensionsComponents of a Script SystemInternational Resources%Table 1-1    The international resourcesKeyboard Resources Table 1-2    The keyboard resourcesFonts!How Script Systems Are ClassifiedTypes of Script Systems$Figure 1-32    Types of script systemsOFigure 1-33    How the script management system handles different types of scripts.Script Codes, Language Codes, and Region Codes6Figure 1-34    The script, language, and region hierarchyOFigure 1-35    Distinguishing scripts by resource ID range (for script codes 0–32)(The System Script and Auxiliary ScriptsFont Script and Keyboard ScriptHow Script Systems WorkCharacter Encoding!The Standard Roman Character Set-Figure 1-36    The Standard Roman character set Other 1-Byte Character Encodings:Figure 1-37    Character encodings for 1-byte script systems2-Byte Character EncodingsEFigure 1-38    Character encoding for a 2-byte script system (Japanese)GFigure 1-39    Constructing blocks (Hangul) from elements (Jamo) in KoreanFont Handling Font Availability and Selection System Font and Application Font%Roman Characters and Associated FontsOther Font Issues$Character Rendering and Text DisplayStorage Order and Display Order,Figure 1-40    Storage order and display orderLine Direction and Alignment<Figure 1-41    How primary line direction affects display order9Figure 1-42    Dialog items truncated at dialog-box boundary2Style Runs, Font Runs, Script Runs, Direction RunsJFigure 1-43    Style runs, font runs, script runs, and direction runs in text Text LayoutCaret Handling.Figure 1-44    Caret position and insertion point2Figure 1-45    Caret positions at direction bondariesHFigure 1-46    Dual caret at direction boundaries in mixed-directional textLFigure 1-47    Single carets at direction boundaries in mixed-directional textHighlightingAFigure 1-48    Highlighting a selection range in unidirectional textDFigure 1-49    Highlighting a selection range in mixed-directional text)Converting Screen Position to Text Offset?Figure 1-50    Interpreting caret position from a mouse-down eventMFigure 1-51    Mouse-down regions and caret positions in mixed-directional textPrinting Text InputKeyboards and Key Translation/Figure 1-52    Apple Keyboard II (domestic layout)Figure 1-53    Key translation;Figure 1-54    Font script and keyboard script synchronizationInput Methods=Figure 1-55    Bottomline input window for Japanese input method;Figure 1-56    Active input area (underlined) for inline input&Figure 1-57    Bottomline input in KoreanText ManipulationSorting Strings.Formatting Dates, Times, Numbers, and SymbolsQFigure 1-58    Filenames and dates in Arabic and U.S. formats (Arabic system script)Analyzing Characters)Searching, Modifying, and Converting Text'Finding Word Boundaries and Line BreaksScript Systems in Use&Installing and Enabling Script Systems Components of the System Script:Figure 1-59    System-script components in the System FolderComponents of Auxiliary Scripts+Installing Modifications to a Script System*How the User Switches Among Script Systems'Figure 1-60    Menu bar with keyboard icon1Figure 1-61    Keyboard icons and input-method iconsFigure 1-62    Keyboard menuFigure 1-63    Arabic Key CapsUser Control of Script SettingsFigure 1-64    Text control panel!Figure 1-65    Numbers control panel%Figure 1-66    Date & Time control panelDFigure 1-67    Date Formats dialog box (from Date & Time control panel)DFigure 1-68    Time Formats dialog box (from Date & Time control panel)TextEditAbout TextEdit(TextEdit and Standard Macintosh FeaturesMultistyled and Monostyled Text'Figure 2-1    Style runs in a line of text)Figure 2-2    Mixed-directional text display(Font and Keyboard Script Synchronization"Cutting, Copying, and Pasting TextThe TextEdit User InterfaceFThe Selection Range, the Insertion Point, and Highlighting in TextEdit-Figure 2-3    Discontinuous highlighting displayBFigure 2-4    Outline highlighted text selection in background windowCaret Position and Movement6Figure 2-5    Caret movement across a direction boundaryText AlignmentLine MeasurementText Buffering,The TextEdit Private, Null, and Style Scraps,An Overview of the TextEdit Data StructuresAn Overview of the Edit Record*Figure 2-6    Destination and view rectanglesRelated Data StructuresQFigure 2-7    Relationship between the TextEdit data structures for monostyled textQFigure 2-8    Relationships among the TextEdit data structures for multistyled textUsing TextEditGetting Started With TextEditPreparing to Use TextEditDisplaying Static Text/Listing 2-1    Using TETextBox to draw static textCreating an Edit Record$Listing 2-2    A sample document record.Listing 2-3    Creating a multistyled edit record.Specifying the Destination and View Rectangles"Setting the Text of an Edit Record2Setting the Selection Range or the Insertion PointScrolling TextDisposing of an Edit Record#Responding to Events Using TextEditHandling a Null Event(Listing 2-4    An idle-processing procedureActivating an Edit RecordHandling Mouse-Down Events2Listing 2-5    Passing a mouse-down event to TextEditResponding to an Update Event,Accepting Text Input Through Key-Down Events(Listing 2-6    Inserting text in a document.Listing 2-7    Getting the selection range length&Moving Text In and Out of Edit Records,Using TextEdit to Cut, Copy, and Paste Text6Figure 2-9    Cutting text from a multistyled edit recordBListing 2-8    Handling Cut, Copy, and Paste commands on an Edit menuInserting and Deleting TextText Attributes5Checking the Text Attributes Across a Selection Range8Figure 2-10    Continuous attributes over a selection rangeWListing 2-9    Determining the font, style, size, and color of the current selection rangeToggling an Attribute<Figure 2-11    An initial selection before TESetStyle is called>Figure 2-12    The result of calling TESetStyle to toggle to bold>Figure 2-13    The result of calling TESetStyle to toggle italicsHandling a Font Menu#Listing 2-10    Handling the Font menuHandling a Font Size Menu#Listing 2-11    Handling the Size menuHandling a Style Menu"Listing 2-12    Handling a Style menudListing 2-13    Checking the style and marking Style menu items to reflect the current selection rangeChanging the Text Alignment@Saving and Restoring a TextEdit Document, and Implementing UndoSaving a TextEdit Document:Listing 2-14    Saving a multistyled text edit record to disk'Restoring an Existing TextEdit Document@Listing 2-15    Restoring a document that uses multistyled TextEditHandling Undo<Listing 2-16    Checking for 2-byte characters when backspacingCustomizing TextEdit!Replacing the End-of-Line RoutineReplacing the Drawing Routine&Replacing the Width-Measuring Routines=Figure 2-14    Determining when to use WIDTHHook and nWIDTHHookReplacing the Hit Test RoutineCustomizing Word SelectionCustomizing Automatic ScrollingDetermining the Line LengthAdvanced CustomizationTextEdit ReferenceData Structures4Figure 2-15    The TextEdit data structures and fieldsThe Edit Record#The High Hook and Caret Hook FieldsThe Style RecordThe Style TableThe Line Height TableThe Null Style RecordThe Style Scrap RecordThe Scrap Style TableText Style RecordRoutinesOInitializing TextEdit, Creating an Edit Record, and Disposing of an Edit RecordTEInit TEStyleNewTENew    TEDispose+Activating and Deactivating an Edit Record
  2. TEActivate TEDeactivateMSetting and Getting an Edit Record’s Text and Character Attribute InformationTEKey    TESetText
  3. TEGetTextTESetStyleHandleTEGetStyleHandle%Setting the Caret and Selection RangeTEIdleTEClick TESetSelectDisplaying and Scrolling TextTESetAlignment    TEUpdate    TETextBox    TECalText TEGetHeight    TEScroll TEPinScroll TEAutoView    TESelView$Modifying the Text of an Edit RecordTEDelete    TEInsertTECutTECopyTEPaste TEStylePaste
  4. TEToScrap TEFromScrap#Managing the TextEdit Private ScrapTEScrapHandleTEGetScrapLengthTESetScrapLength'Checking, Setting, and Replacing Styles
  5. TESetStyleTEReplaceStyleTEContinuousStyleTEStyleInsertTEGetStyleScrapHandleTEUseStyleScrap TENumStyles+Using Byte Offsets and Corresponding Points TEGetOffset
  6. TEGetPointAdditional TextEdit FeaturesTEFeatureFlagCustomizing TextEdit TECustomHookTESetWordBreakTESetClickLoopSummary of TextEditQuickDraw TextAbout QuickDraw TextGraphics Ports and Text DrawingFont, Font Style, and Font Size Figure 3-1    Stylistic variationsTransfer ModesHFigure 3-2    Effect of the basic transfer modes for black-and-white images3QuickDraw Text, Script Systems, and Other Managers/Figure 3-3    Multiple style runs on a single line"Text Formatting and Justification&Figure 3-4    Justification of Roman textScalingCarets and HighlightingUsing QuickDraw TextPreparing to Use QuickDraw3Determining the Version and Initializing QuickDraw(Setting Up the Text-Drawing EnvironmentSpecifying Text CharacteristicsHListing 3-1    Using QuickDraw to set the graphics port text-related fieldsSetting the FontModifying the Text StyleChanging the Font Size Changing the Width of CharactersUsing Fractional Glyph WidthsSpecifying the Transfer ModeBasic Transfer Mode Operations#Arithmetic Transfer Mode OperationsThe grayishTextOr Transfer ModeText Mask ModeTransparent Transfer Mode!Transfer Modes and Multibit Fonts-Measuring and Drawing Single Segments of TextIndividual GlyphsPascal StringsText Segments #Measuring and Drawing Lines of Text#Determining Where to Break the LineLListing 3-2    Calling StyledLineBreak to identify where to break the text line,Determining the Display Order for Style RunsRListing 3-3    An application-defined run direction function called by GetFormatOrderHListing 3-4    Determining the style run display order and drawing the line0Eliminating Trailing Spaces (for Justified Text)6Figure 3-5    Calling VisibleLength for a Roman style run8Figure 3-6    Calling VisibleLength for a Hebrew style runLFigure 3-7    Calling VisibleLength for Hebrew text with Roman space characters0Calculating the Slop Value (for Justified Text):Allocating the Slop to Each Style Run (for Justified Text)4Listing 3-5    Distributing slop value among style runsDrawing the Line of Text<Listing 3-6    Calling GetFontInfo to determine the line heightUsing Scaled TextfListing 3-7    Turning off reordering of right-to-left text before calling PixelToChar for line-breakingcListing 3-8    Using StdTxMeas to get the font metrics for determining the line height of scaled textDrawing Carets and HighlightingDFigure 3-8    What pixel position means for CharToPixel and PixelToChar7Converting an Onscreen Pixel Location to a Byte Offset,Finding a Caret Position and Drawing a Caret=Figure 3-9    Caret position for a leading-edge mouse-down event?Figure 3-10    Caret position for a trailing-edge mouse-down eventVFigure 3-11    Caret position for a leading-edge mouse-down event at a direction boundaryXFigure 3-12    Caret position for a trailing-edge mouse-down event at a direction boundaryXFigure 3-13    Caret position for a trailing-edge mouse-down event at a direction boundary\Figure 3-14    Caret position for a mouse-down event beyond the last glyph of the text segment@Listing 3-9    Drawing the caret and highlighting a selection range0Synchronizing the Caret With the Keyboard ScriptHighlighting a Text Selection/Figure 3-15    Highlighting mixed-directional text%Customizing QuickDraw’s Text HandlingText in QuickDraw PicturesFonts<Listing 3-10    Generating a picture file with font information1Listing 3-11    A picture file with font informationText With Multiple Style RunsQuickDraw Text ReferenceData StructuresThe Font Information RecordThe Style Data Type    RoutinesSetting Text CharacteristicsTextFontTextFaceTextMode-Table 3-1    Effects of the basic transfer modes/Table 3-2    Transfer mode constants and selectorsTextSize
  7. SpaceExtra
  8. CharExtra GetFontInfo Drawing TextDrawChar
  9. DrawStringDrawTextDrawJustifiedMeasuring Text    CharWidth StringWidth
  10. TextWidth MeasureTextMeasureJustifiedLaying Out a Line of TextGetFormatOrderVisibleLength PortionLineCDetermining the Caret Position, and Selecting and Highlighting Text PixelToChar CharToPixel HiliteText!Low-Level QuickDraw Text RoutinesStdText    StdTxMeasApplication-Supplied Routine MyRlDirProcSummary of QuickDraw Text Font Manager About Fonts'Characters, Character Codes, and GlyphsKinds of FontsIdentifying FontsFont Measurements'Figure 4-1    Terms for font measurements/Figure 4-2    The ascent line and maximum y-value7Figure 4-3    Unkerned text (top) and kerned text (bottom)About Font ResourcesFont Resource Types$A Brief History of Font Resource UseFont Family IDs/Table 4-1    Subdivisions of Roman font family IDs+Restrictions on the Use of 'FONT' ResourcesFont Resource TablesAbout the Font ManagerHow QuickDraw Requests a Font/How the Font Manager Responds to a Font Request"How the Font Manager Scales Fonts=Figure 4-4    A comparison of scaled bitmapped and outline fonts)Figure 4-5    A glyph stretched horizontally'Figure 4-6    A glyph stretched vertically)Figure 4-7    A glyph condensed horizontally)The Scaling Process for a Bitmapped Font'The Scaling Process for an Outline Font,How the Font Manager Calculates Glyph WidthsSynthetic Fonts*How the Font Manager Renders Outline Fonts@Figure 4-8    The effect of an off-curve point on two Bézier curves7Figure 4-9    An outline with points on and off the curve5Figure 4-10    A curve with consecutive off-curve points)Figure 4-11    A glyph from an outline fontKFigure 4-12    An unmodified glyph from an outline font at a small point size5Figure 4-13    An instructed glyph from an outline fontUsing the Font Manager'Adding Font Sizes and Names to the Menu7Figure 4-14    A sample Size menu and font size dialog box!Storing a Font Name in a Document=Listing 4-1    Checking a font name against the system font name$Getting Font Measurement Information#Favoring Outline or Bitmapped FontsPreserving the Shapes of GlyphsGFigure 4-15    The difference between a scaled glyph and a preserved glyphUsing Width Tables*Getting the System or Application Font ID.Using Fractional Glyph Widths and Font ScalingFont Manager ReferenceData StructuresThe Font Input RecordThe Font Output RecordThe Global Width TableThe Font RecordThe Font Family Record!The Font Association Table Record#The Family Glyph-Width Table RecordThe Style-Mapping Table Record$The Font Family Kerning Table RecordRoutinesInitializing the Font Manager
  11. InitFontsGetting Font Information GetFontNameGetFNumRealFont0Using the Current, System, and Application FontsGetDefFontSize GetSysFont
  12. GetAppFont%Getting the Characteristics of a Font FontMetricsOutlineMetrics Enabling Fractional Glyph WidthsSetFractEnableDisabling Font ScalingSetFScaleDisable,Favoring Outline Fonts Over Bitmapped FontsSetOutlinePreferredGetOutlinePreferred    IsOutlineScaling Outline FontsSetPreserveGlyphGetPreserveGlyph#Accessing Information About a Font
  13. FMSwapFontHandling Fonts in Memory SetFontLock
  14. FlushFonts$The Bitmapped Font ('NFNT') Resource0Figure 4-16    The bitmapped font ('NFNT') resourceThe Font Type Element%The Offset to the Width/Offset Table#The Outline Font ('sfnt') ResourceThe Font DirectoryFigure 4-17    The font directory5Listing 4-2    Calculating the checksum of a given table The Character-Code Mapping TableThe Control-Value TableThe Font Program TableThe Glyph Data TableFigure 4-18    A glyph description#The Horizontal Device Metrics TableThe Font Header Table!Figure 4-19    The font header table/Listing 4-3    Calculating the checksum of a fontThe Horizontal Header TableThe Horizontal Metrics Table(Figure 4-20    The horizontal metrics tableThe Kerning TableThe Location TableThe Maximum Profile TableThe Font Naming TableFigure 4-21    The naming tableTable 4-2    Platform identifiers+Table 4-3    ISO platform-specific identifiersTable 4-4    ISO language codesTable 4-5    Font name identifiersThe PostScript TableThe Preprogram Table"The Font Family ('FOND') Resource.Figure 4-22    The font family ('FOND') resourceThe Font Style CodeFigure 4-23    Style codesThe Font Association Table&Figure 4-24    The font association tableThe Offset TableFigure 4-25    The offset tableThe Bounding-Box Table"Figure 4-26    The bounding-box tableThe Family Glyph-Width Table-Figure 4-27    The font family glyph-width tableThe Style-Mapping Table$Figure 4-28    The style-mapping tableIListing 4-4    Using the style-mapping table to build a PostScript font nameThe Font Family Kerning Table)Figure 4-29    The font family kerning table Figure 4-30    A kerning pair entrySummary of the Font Manager    RoutinesText UtilitiesAbout the Text Utilities2The Text Utilities and the International ResourcesObtaining Resource Information*Figure 5-1    Determining the current scriptPascal Strings and Text Strings<Figure 5-2    A string containing 1-byte and 2-byte charactersUsing the Text UtilitiesDefining Strings Working With String Handles6Listing 5-1    Using the NewString and SetString routinesWorking With String Resources&Sorting Strings in Different Languages5Figure 5-3    Strings in different languages in one list:Figure 5-4    Strings in different languages sorted by scriptJFigure 5-5    Strings in different languages sorted by language within script$Sorting Strings in the Same Language#Primary and Secondary Sorting OrderETable 5-1    Excerpt from the Standard Roman script system sorting order(Expansion and Contraction of CharactersIgnorable Characters#Converting and Stripping CharactersSpecial Cases for SortingVariations in Sorting BehaviorChoosing a Comparison Routine  /Figure 5-6    Choosing a string comparison routine7Table 5-2    Sorting features of the Macintosh file system Testing Two Strings for Equality"Comparing Two Strings for OrderingModifying Text5Converting Characters and Stripping Marks in Strings#Fitting a String Into a Screen Area.Figure 5-7    Truncating a pathname in its middle!Listing 5-2    Truncating a pathnameReplacing a Portion of a StringLFigure 5-8    Replacing a portion of a string with 1-byte and 2-byte characters,Listing 5-3    Substituting and truncating text-Finding Word, Line, and Script Run BoundariesFinding Word BoundariesFinding Line Breaks3Figure 5-9    Finding line breaks in multiscript text>Figure 5-10    Relationships of the parameters of StyledLineBreak.Listing 5-4    Using the StyledLineBreak function&Finding Subscripts Within a Script Run,Figure 5-11    Extracting blocks of Roman text "Working With Date and Time Strings3Table 5-3    Variations in time and short date formats9Table 5-4    Variations in long and abbreviated date formatsQConverting Formatted Date and Time Strings Into Internal Numeric Representations/Listing 5-5    Using StringToDate and StringToTime6Table 5-5    StringToDateStatus values and their meanings$Date and Time Value Representations5Converting Standard Date and Time Values Into StringsWorking With Numeric Strings1Figure 5-12    Using the number formatting routinesBTable 5-6    FormatResultType values for numeric conversion functions/Converting Between Integers and Numeric Strings<Listing 5-6    Converting a long integer into a numeric string)Using Number Format Specification Strings Table 5-7    Numeric string formats9Table 5-8    Examples of number format specification strings+Table 5-9    Literals in number format stringsTable 5-10    Filling digits in6Table 5-11    Quoting mechanisms in number format strings,Table 5-12    Symbols in number format stringsUConverting Number Format Specification Strings Into Internal Numeric Representations=Converting Between Floating-Point Numbers and Numeric StringsText Utilities ReferenceData StructuresThe Offset Table RecordThe Date Cache Record&The Number Format Specification RecordThe Triple Integer ArrayThe Script Run Status RecordRoutinesDefining and Specifying Strings    NewString    SetString    GetStringGetIndStringComparing Strings for Equality EqualStringIdenticalStringIdenticalText<Determining Sorting Order for Strings in Different Languages"Table 5-13    Implicit language codes ScriptOrderLanguageOrder StringOrder    TextOrder:Determining Sorting Order for Strings in the Same Language    RelStringCompareString CompareText+Modifying Characters and Diacritical Marks UpperStringLowercaseTextUppercaseTextStripDiacriticsUppercaseStripDiacriticsTruncating Strings TruncString    TruncText#Searching for and Replacing Strings ReplaceTextMunger.Working With Word, Script, and Line BoundariesFindWordBreaksStyledLineBreakFindScriptRun=Converting Date and Time Strings Into Numeric RepresentationsInitDateCacheStringToDate StringToTime=Converting Numeric Representations Into Date and Time Strings
  15. DateString TimeString2Converting Long Date and Time Values Into StringsLongDateStringLongTimeString'Converting Between Integers and Strings NumToString  StringToNumMUsing Number Format Specification Strings for International Number FormattingStringToFormatRecFormatRecToString5Converting Between Strings and Floating-Point NumbersStringToExtendedExtendedToStringSummary of Text UtilitiesScript ManagerAbout the Script Manager4The Script Manager and the Script Management System#The Script Manager and Applications Evolution of the Script Manager)Table 6-1    Evolution of the Script ManagerUsing the Script Manager2Testing for the Script Manager and Script SystemsHTable 6-2    Version numbers for the Script Manager and Roman script systemControlling Settings)Checking and Setting the System Direction.Checking and Setting Script Manager VariablesfTable 6-3    Script Manager variables accessed through GetScriptManagerVariable/SetScriptManagerVariableBListing 6-1    Specifying a dual caret with SetScriptManagerVariable%Checking and Setting Script VariablesPTable 6-4    Script variables accessed through GetScriptVariable/SetScriptVariableIListing 6-2    Representing font names correctly in the script for that font5Listing 6-3    Setting the size of the Balloon Help fontMaking Keyboard SettingsETable 6-5    Constants for the code parameter in the KeyScript procedure1Synchronizing the Font Script and Keyboard Script<Listing 6-4    Setting the keyboard script from the font script?Listing 6-5    Setting the font (script) from the keyboard scriptObtaining Information.Determining Script Codes From Font Information6Figure 6-1    Determining script code from font family IDAnalyzing Characters<Listing 6-6    Handling 2-byte characters in a search procedure3Figure 6-2    Fields in the CharacterType return value*Directly Accessing International Resources(Using Currency, Number, and Date FormatsDListing 6-7    Determining the number separators for the current scriptUsing Number PartsJListing 6-8    Getting number parts from a script system’s number parts tableRetrieving Text From Tokens9Listing 6-9    Getting a token string from the untoken tableUsing Word-Break TablesUsing Whitespace InformationConverting Text Tokenization&Figure 6-3    The action of IntlTokenize4Figure 6-4    IntlTokenize data structures (simplified)Transliteration)Figure 6-5    The effects of transliterationModifying Script Systems;Replacing a Script System’s Default International Resources-Replacing a Script System’s Default RoutinesKFigure 6-6    Dispatch table entry for script utilities and QuickDraw patchesScript Manager Reference    Constants Script CodesLanguage CodesRegion Codes Token Codes'Selectors for Script Manager VariablesSelectors for Script VariablesFigure 6-7    Style code formatData StructuresToken Block Record Token RecordRoutines)Checking and Setting the System DirectionGetSysDirectionSetSysDirection-Checking and Setting Script Manager VariablesGetScriptManagerVariableSetScriptManagerVariable%Checking and Setting Script VariablesGetScriptVariableSetScriptVariableMaking Keyboard Settings    KeyScript.Determining Script Codes From Font Information
  16. FontScript FontToScript
  17. IntlScriptAnalyzing CharactersCharacterByteTypeCharacterTypeFillParseTable*Directly Accessing International ResourcesClearIntlResourceCacheGetIntlResourceGetIntlResourceTable Tokenization IntlTokenizeTransliterationTransliterateText-Replacing a Script System’s Default RoutinesGetScriptUtilityAddressSetScriptUtilityAddressGetScriptQDPatchAddressSetScriptQDPatchAddressSummary of the Script ManagerText Services ManagerAbout Text ServicesAbout Input Methods8Figure 7-1    Bottomline input with a floating input windowFigure 7-2    Inline input=Figure 7-3    Displaying conversion options for bottomline input About the Text Services ManagerThe Text Services EnvironmentLFigure 7-4    How a TSM-aware client application uses the Text Services Manager,The Text Services Manager and Input Methods Inline InputLFigure 7-5    Entering, converting, and confirming text in an active input areaFloating Input WindowsIFigure 7-6    How a non-TSM-aware application uses the Text Services ManagerFloating Utility Windows(Figure 7-7    Floating window service layerAbout Text Service ComponentsUFigure 7-8    The format of the componentFlags field of the component description record:Using the Text Services Manager (for Client Applications)9Testing for the Availability of the Text Services Manager!Calling the Text Services Manager(Initializing as a TSM-Aware Application3Listing 7-1    Initializing as a TSM-aware applicationCreating a TSM DocumentHListing 7-2    Creating a new TSM document and associating it with a window+Making Text Services Available to the User*Activating and Deactivating a TSM Document7Listing 7-3    Activating and deactivating a TSM document3Passing Events, Menu Selections, and Cursor Setting6Listing 7-4    Passing events to a text service component-Confirming Active Text Within a TSM Document3Listing 7-5    Confirming text in an active input areaDeleting a TSM Document'Closing Down as a TSM-Aware Application+Listing 7-6    Closing a TSM-aware application1Requesting a Floating Input Window for Text Entry5Associating Input Methods With Scripts and Languages"Handling Text Service Apple Events1Receiving Text and Updating the Active Input AreaIListing 7-7    A sample handler for the Update Active Input Area Apple event)Converting Screen Position to Text OffsetDListing 7-8    A sample handler for the Position To Offset Apple event)Converting Text Offset to Screen PositionRFigure 7-9    Drawing a window with conversion options next to the active input areaCListing 7-9    A sample handler for the Offset To Position Apple event"Showing or Hiding the Input Window(Direct Access to Text Service ComponentsCalling the Component Manager Calling Text Service Components>Using the Text Services Manager (for Text Service Components)Providing Menus and Icons'Providing a Text Service Component Menu2Providing Input Method Icons for the Keyboard Menu@Figure 7-10    Input method icons in the Keyboard menu and menu barResponding to CallsInitiating a Text Service)Activating Text Service Component Windows5Responding to Events and Updating the Cursor and MenuConfirming Active Text InputClosing a Text Service/Identifying the Supported Scripts and LanguagesMListing 7-10    Determining the script and language for a text service component Making Calls+Sending Apple Events to Client ApplicationsMListing 7-11    Constructing and sending an Update Active Input Area Apple event Opening Floating Utility WindowsText Services Manager Reference6Text Services Manager Routines for Client Applications3Initializing and Closing as a TSM-Aware ApplicationInitTSMAwareApplicationCloseTSMAwareApplication%Creating and Activating TSM DocumentsNewTSMDocumentActivateTSMDocumentDeactivateTSMDocumentDeleteTSMDocument*Passing Events to Text Service ComponentsTSMEvent+Passing Menu Selections and Cursor SettingTSMMenuSelect SetTSMCursor)Confirming Active Input in a TSM DocumentFixTSMDocument*Making Text Services Available to the UserGetServiceListOpenTextServiceCloseTextService"Requesting a Floating Input WindowUseInputWindow1Associating Scripts and Languages With ComponentsSetDefaultInputMethodGetDefaultInputMethodSetTextServiceLanguageGetTextServiceLanguage4Apple Event Handlers Supplied by Client Applications"Table 7-1    Apple event ID constants'Table 7-2    Apple event keyword constants&Table 7-3    Apple event descriptor typesPTable 7-4    Apple event descriptor type constants for the Apple event region class+Creating and Updating an Active Input Area2Figure 7-11    Updating text in an active input area-Converting Global Coordinates to Text Offsets-Converting Text Offsets to Global Coordinates+Showing or Hiding the Floating Input Window.Text Services Manager Routines for Components,Sending Apple Events to a Client ApplicationSendAEFromTSMComponent Opening Floating Utility WindowsNewServiceWindowCloseServiceWindowGetFrontServiceWindowFindServiceWindow Text Service Component RoutinesProviding a Text ServiceInitiateTextServiceActivateTextServiceDeactivateTextServiceHidePaletteWindowsTerminateTextService5Responding to Events and Updating the Cursor and MenuTextServiceEventTextServiceMenuSelectSetTextServiceCursorGetTextServiceMenu)Confirming Active Input in a TSM DocumentFixTextService/Identifying the Supported Scripts and LanguagesGetScriptLanguageSupport%Summary of the Text Services ManagerDictionary Manager$About Dictionaries for Input MethodsAbout the Dictionary ManagerThe Structure of a Dictionary0Figure 8-1    General format of a dictionary record/Figure 8-2    Format of data associated with a key@Figure 8-3    Format of an entry in the data associated with a keyGarbage Data3Figure 8-4    A simple dictionary with no garbage data1Figure 8-5    Creating garbage data in a dictionary2Figure 8-6    Deleting garbage data from a dictionaryDictionary Manager LimitationsUsing the Dictionary Manager2Testing for the Presence of the Dictionary ManagerMaking a DictionaryCreating the File&Listing 8-1    Creating a dictionary fileConstructing the DictionaryAccessing a Dictionary"Opening and Closing the Dictionary1Listing 8-2    Opening and closing a dictionary file*Obtaining Information About the Dictionary4Listing 8-3    Obtaining information about a dictionary Locating Records in a DictionaryLocating Records by Key*Figure 8-7    The requested attributes table8Table 8-1    Sample data returned by FindRecordInDictionaryLocating Records by Index;Listing 8-4    Displaying all records in a dictionary by indexModifying a Dictionary0Listing 8-5    Inserting a record into a dictionaryCompacting a DictionaryDictionary Manager ReferenceData StructuresRoutinesMaking a DictionaryInitializeDictionaryAccessing a DictionaryOpenDictionaryCloseDictionaryGetDictionaryInformation Locating Records in a DictionaryFindRecordInDictionary8Table 8-2    Defined attribute types for dictionary entriesFindRecordByIndexInDictionaryModifying a DictionaryInsertRecordToDictionaryDeleteRecordFromDictionaryCompacting a DictionaryCompactDictionary"Summary of the Dictionary Manager AppendixesBuilt-in Script SupportThe Roman Script System The Standard Roman Character Set+Figure A-1    The Standard Roman character setNonprinting CharactersDTable A-1    Nonprinting characters in the Standard Roman character set5Table A-2    Low-ASCII characters to avoid as delimitersPrinting CharactersATable A-3    Printing characters in the Standard Roman character set Variations in the Character SetCTable A-4    Croatian variations from the Standard Roman character setCTable A-5    Romanian variations from the Standard Roman character setBTable A-6    Turkish variations from the Standard Roman character setPTable A-7    Icelandic and Faroese variations from the Standard Roman character set+The U.S. Keyboard-Layout ('KCHR') ResourceStandard Sorting RoutinesCTable A-8    Standard sorting order (for Standard Roman character set)*Diacritical Stripping and Case Conversion3U.S. International Resources and Keyboard Resources9Table A-9    International resources in U.S. system software5Table A-10    Keyboard resources in U.S. system softwareWorldScript IAbout WorldScript I-Shared Script Utilities and QuickDraw Patches6Table A-11    Script utilities supported by WorldScript I7Table A-12    QuickDraw patches supported by WorldScript ITable-Based Script BehaviorContextual Formatting RoutinesFlexible Dispatching MethodInitialization SequenceHow Calls Are DispatchedJFigure A-2    Dispatch table entry for script utilities and QuickDraw patchesBFigure A-3    How calls are dispatched to the 1-byte script utilitiesCFigure A-4    How calls are dispatched to the 1-byte QuickDraw patchesSaving User Preferences-Replacing a Script Utility or QuickDraw PatchPatching Script Utilities@Table A-13    Classification of 1-byte script utilities by functionPatching QuickDraw RoutinesATable A-14    Classification of 1-byte QuickDraw patches by function7Issues in Designing a Script Utility or QuickDraw PatchWorldScript IIAbout WorldScript IIShared Script Utilities7Table A-15    Script utilities supported by WorldScript IITable-Based Script BehaviorInitialization SequenceHow Calls Are DispatchedInternational Resources"About the International Resources$What the International Resources Are%Table B-1    The international resources#Script Codes and Resource ID Ranges3Table B-2    Resource ID ranges for each script system!Using the International Resources2International Configuration Resource (Type 'itlc')The ItlcRecord Data Type&Script-Sorting Resource (Type 'itlm')8Figure B-1    Format of the script-sorting resource headerRFigure B-2    Script, language, and region data tables in the script-sorting resourceOTable B-3    Sorted scripts, languages, and regions from a script-sorting resource-International Bundle Resource (Type ' itlb')The ItlbRecord Data TypeThe ItlbExtRecord Data Type&Numeric-Format Resource (Type 'itl0')5Table B-4    Constants for specifying numeric separatorsThe Intl0Rec Data Type(Long-Date-Format Resource (Type 'itl1')The Intl1Rec Data Type1Table B-5    Separator positions in long date format+Figure B-3    Examples of long date formattingThe Itl1ExtRec Data Type*String-Manipulation Resource (Type 'itl2')Resource Header=Figure B-4    Format of the string-manipulation resource headerThe 'itl2' Sorting HooksThe 'itl2' TablesScript Run Table Format=Figure B-5    Format of the script run table header (new format)'Figure B-6    Script run table state table3Figure B-7    Format of a script run table action code6Figure B-8    Format of the script run table return table!Supplying Custom Sorting Routines"Supplying Custom Word-Break TablesNBreakTable Format#Figure B-9    NBreakTable state table0Figure B-10    Format of an NBreakTable action code;Table B-6    Example of classes for an NBreakTable state table:Table B-7    Example of states for an NBreakTable state table(How FindWordBreaks Uses the Break TableEFigure B-11    Forward operation of the state machine for word selectionTokens Resource (Type 'itl4')The NItl4Rec Data TypeThe Token Table%Figure B-12    Format of the token tableThe Extension-Fetching RoutineThe Token-String Copy RoutineThe Untoken TableThe Number Parts TableThe Whitespace Table*Figure B-13    Format of the whitespace table)Encoding/Rendering Resource (Type 'itl5')Resource Header!Tables for 1-Byte Script SystemsScript Configuration Table5Figure B-14    Format of the script configuration tableOTable B-8    A script configuration table for a Hebrew encoding/rendering resourceLine-Layout Metamorphosis Table#Line-Layout Glyph-Properties TableCharacter Expansion Table3Figure B-15    Format of the character expansion tableGlyph-to-Character Table2Figure B-16    Format of the glyph-to-character tableBreak-Table Directory/Figure B-17    Format of the break-table directoryScript Run TablesKashida Preferences TableFeature List TableReordering Table Tables for 2-Byte Script SystemsGTable B-9    Sample encoding/rendering resource for a 2-byte script systemByte-Type TableCharacter-Type Table&Transliteration Resource (Type 'trsl')Resource Header9Figure B-18    Format of the transliteration resource headerRule-Based Format,Figure B-19    Format of a transliteration ruleTable-Based Format'Summary of the International ResourcesKeyboard ResourcesAbout KeyboardsTable C-1    The keyboard types.Figure C-1    Apple Keyboard II (domestic layout)7Figure C-2    Apple Extended Keyboard II (domestic layout)7Table C-2    The keyboard modifier bits in an event recordAbout the Keyboard Resources What the Keyboard Resources Are Table C-3    The keyboard resourcesKey Translation'Figure C-3    The key translation processUsing the Keyboard ResourcesKey-Map Resource (Type 'KMAP'))Figure C-4    Format of the key-map resourceApple Extended KeyboardKTable C-4    Key-map resource assignment of raw key codes to virtual key codes!Reassigning Right-Hand Key CodesITable C-5    Reassigning right key codes for Shift, Option, and Control keysOther Hardware DependenciesKTable C-6    ADB and non-ADB virtual key codes for cursor keys and keypad keys'Virtual Key Codes for Non-ADB KeyboardsITable C-7    Virtual key codes for the international Macintosh Plus keyboard Key-Remap Resource (Type 'itlk')7Figure C-5    Format of an entry in the key-remap resource'Keyboard-Layout Resource (Type 'KCHR')Resource Format2Figure C-6    Format of the keyboard-layout resource:The KeyTranslate Function and the Keyboard-Layout Resource/Figure C-7    Inside the keyboard-layout resource+Special Uses for the KeyTranslate Function,Installing a Custom Keyboard-Layout Resource9Listing C-1    Loading a non-system keyboard-layout resource.Using KeyTranslate for Command-Key Equivalents<Listing C-2    Regenerating a character code with KeyTranslate4Keyboard Icon Family (Types 'kcs#', 'kcs4', 'kcs8')ATable C-8    Keyboard color icon types and standard icon equivalents Figure C-8    Sample keyboard icons$Keyboard-Swap Resource (Type 'KSWP'):Figure C-9    Format of entries in the keyboard-swap resource1Listing C-3    A hypothetical keyboard-swap resource Key-Caps Resource (Type 'KCAP')Resource Format,Figure C-10    Format of the key-caps resource7Listing C-4    Sample key-caps resource data in Rez format?Figure C-11    Shape array and resulting region for the Return keyKey Caps Desk Accessory-Figure C-12    Key Caps display with key originsAFigure C-13    Key Caps display of dead keys with Option key pressedYFigure C-14    Key Caps display of completer keys after circumflex dead key has been pressed"Summary of the Keyboard Resources$Renamed and Relocated Text RoutinesJTable D-1    Renamed, relocated, and obsolete text and international routines    GlossaryIndex